home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / c / cuj9205.zip / 1005065A < prev    next >
Text File  |  1992-06-02  |  1KB  |  55 lines

  1. /* Listing 5 */
  2.  
  3. /*****************************************************
  4.     LABMASTR.C 
  5.  
  6.     Basic Routines required for programming the 
  7.     Lab Master AD.
  8.  
  9.     Copyright Don Bradley, 1991.
  10.  
  11.     Permission is granted for used of these routines
  12.     in any manner as long as this copyright notice is
  13.     included.
  14.  
  15.     Tested using Quick C 2.5 and MSC 6.0 on a 
  16.     Toshiba T5200.
  17.  
  18.  *****************************************************/
  19.  
  20. #include <conio.h>
  21.  
  22. #include "labmastr.h"
  23.  
  24. int LabMasterAD_Enable()
  25. /*& Enables the Labmaster AD card. Returns Enable 
  26.      Status. */
  27.     {
  28.     if(LabMasterAD_Product() != LM_ID)
  29.         return (0);
  30.  
  31.     outp(BRD_ENABLE, 1);
  32.     return (inp(BRD_ENABLE) & 1);
  33.     }
  34.  
  35. int LabMasterAD_Disable()
  36. /*& Disables the Labmaster AD card. Returns Enable 
  37.      Status. */
  38.     {
  39.     outp(BRD_ENABLE, 0);
  40.     return (inp(BRD_ENABLE) & 1);
  41.     }
  42.  
  43. int LabMasterAD_Product()
  44. /*& Returns the Labmaster AD Product Code */
  45.     {
  46.     return (inp(PRODUCT));
  47.     }
  48.  
  49. int LabMasterAD_Version()
  50. /*& Returns the Labmaster AD Version Number */
  51.     {
  52.     return (inp(VERSION));
  53.     }
  54.  
  55.